def ss(n):
    sum = 0
    print("{}的约数：".format(n))
    for i in range(1,n+1):
        if n%i==0:
            print(i)
            sum = sum+i
    if sum==n+1:
        return True
    else:
        return False
def main():
    n = int(input("输入一个非负整数："))
    for num in range(1,n+1):
        p=ss(num)
        if p==True:
            print("{}是素数".format(num))
        elif p==False:
            print("{}不是素数".format(num))
if __name__ == '__main__':
    main()